package com.onpositive.knowledge.model.value.audits;

import java.util.Set;

import com.onpositive.knowledge.model.values.DescribedValue;
import com.onpositive.semantic.model.api.property.IProperty;

public class RefsCounterAudit extends AbstractValueAudit {
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 3710973189825030116L;
	public static final String ID = "refs-counter-audit";

	@Override
	protected boolean onStatsCompleted(AbstractAuditResult pm) {
		
		return false;
	}

	@Override
	protected void preprocessValue(Object o, DescribedValue value, IProperty prop, AbstractAuditResult pm) {
		
		if( !(pm instanceof ValueCounterAuditResult) )
			return ;
		
		ValueCounterAuditResult sar = (ValueCounterAuditResult) pm ;
		sar.take( value.value() ) ;		
	}

	@Override
	protected boolean isSuspicious(Object o, DescribedValue value, IProperty prop, AbstractAuditResult pm) {
		return false;
	}

	@Override
	public AbstractAuditResult createAuditResult( IProperty prop ) {
		
		return new ValueCounterAuditResult( prop );
	}

	@Override
	public Set<String> getRequiredAudits() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getId() {
		return ID;
	}

}
